#include <stdio.h>
#include <stdlib.h>
#define BUFFSIZE 2048

enum { //gnu 3d plot types
	points,
	dots,
	lines,
	pm3d,
	heat
};

typedef struct _datapt_t {
	double x[3];
} datapt_t;

typedef struct _options_t {
	int interactive; //gnuplot session type
	int geometry[2]; //graph window geometry
	int withtype; //points, dots, lines, pm3d
	FILE * cmdfile; //contains gnuplot commands
	char cmdname[BUFFSIZE]; 
	FILE * tempfile; //contains sorted data when needed
	char tempname[BUFFSIZE];
	char outname[BUFFSIZE];
	FILE * outfile; //for writing output

	datapt_t * readarray;

	int griddim[2]; //dimension on output grid for grid-type graphs
	double gridsigma[2]; //grid sigma for x and y direction

} options_t;

void usage ( char *, options_t *);
void checkfileptr(FILE *, char *, options_t *);
int parseargs( int, char **, options_t *);
void checkfileptr(FILE *, char *, options_t *);
void setdefaults(options_t *);
